﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@model PerfectBuyData.Articulo

<article id="address">
    <h1>Agregar Artículo</h1>
    @using (Html.BeginForm("Create", "Administracion", FormMethod.Post, new { enctype = "multipart/form-data", @class = "articulos"}))
    {
        @Html.ValidationSummary(true)

        <fieldset>
            <div class="editor-label">
                <label>Nombre</label>
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.nombre)
                @Html.ValidationMessageFor(model => model.nombre)
            </div>

            <div class="editor-label">
                <label>Descripción</label>
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.descripcion)
                @Html.ValidationMessageFor(model => model.descripcion)
            </div>

            <div class="editor-label">
                <label>Categoría</label>
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.categoria)
                @Html.ValidationMessageFor(model => model.categoria)
            </div>

            <div class="editor-label">
                <label>Precio</label>
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.precio)
                @Html.ValidationMessageFor(model => model.precio)
            </div>

            <div class="editor-label">
                <label>Cantidad</label>
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.cantidad)
                @Html.ValidationMessageFor(model => model.cantidad)
            </div>

            <div class="editor-label">
                <label>Imagen</label>
            </div>
            <div class="editor-field">
                <input type="file" name="fileBase" />
            </div>

            <p>
                <input type="submit" value="Agregar" />
            </p>
        </fieldset>
    }
</article>

<div>
    @Html.ActionLink("Regresar a la lista", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
